package com.meilingcloud.quartz.task;

import cn.hutool.http.Header;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * HIS导入定时任务调度
 */
@Component("hisImportTask")
public class HisImportTask {

    public void run() {
        // 请求地址
        String url = "";
        Map<String, Object> paramMap = new HashMap<>();
        HttpResponse response = HttpRequest.post(url)
                .header(Header.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
                .form(paramMap)
                .timeout(20000)
                .execute();
        if (response.getStatus() == 0) {
            System.out.println(response.body());
        }
    }

}
